import { createApp } from 'vue'
// import App from './App.vue'
// import App from './components/01_ref属性.vue'
// import App from './components/02_nextTick监听dom更新.vue'
// import App from './components/03_自定义指令.vue'
import * as http from '@/components/04_https'
// import App from './components/04_自定义全局属性.vue'

// import App from './components/05_混入Mixin.vue'

// import App from './components/06_插件.vue'
import myplugin from './components/06_global_plugin'

// import App from './components/07_ElementPlus.vue'
// import App from './components/08_transition.vue'
// import App from './components/08_动态组件.vue'
// import App from './components/09_异步组件.vue'
// import App from './components/10_跨组件通信Provide_Inject.vue'
// import App from './components/11_Teleport传送门功能.vue'
// import App from './components/12_动态创建组件.vue'
import App from './components/13_虚拟dom与render函数.vue'





// import App from './components/08_动态组件.vue'


import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app = createApp(App)

//引入elementplus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//实现插件初始化，全局指令，全局属性均可迁移到插件内
app.use(myplugin,  {info:'配置信息'})
//初始化elementplus
app.use(ElementPlus);
//v-auth 实现全局指令
// app.directive('auth' , (el,binding)=>{
//     let auths = ['select', 'delete']
//     let ret = auths.includes(binding.value);
//     if(!ret){
//         el.style.display = 'none'
//     }
// });

//实现全局属性
// app.config.globalProperties.$http = http;

app.mount('#app')

